#ifndef __PARTITIONING_H__
#define __PARTITIONING_H__

#include "stdafx.h"
#include "Grid.h"
#include "VBO.h"
#include <vector>

class Player;
class BallManager;

class Partition : public Node
{
private:
	typedef vector<Grid*> GridVec;
	typedef GridVec::iterator GridVecIter;
	GridVec grids; // The array of grids
	int rows, cols;
	VBO vbo;

protected:
	Partition() {};
	Partition(vec3 size, int rows, int cols);

	void Init(vec3 size, int rows, int cols);

	void Update(float delta);

	Grid* GetGrid(int row, int col);

	void Draw(void);

	BallManager *balls;
	Player *player;
	Node GridParent;
};

#endif